package com.iflytek.application.common.springdata.jdbc.repository;

import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * Created by guanxf on 2016/3/10.
 */
public interface JdbcTemplateRepository {
    public int save(String tablename, Object object) throws Exception;

    public int update(String tablename, String properties, Object object) throws Exception;

    public List<?> saveOrUpdateAll(String tablename,final String keyid,Object object,final List<?> list) throws Exception ;

    public Object findOne(Class<?> c, String table, int id);

    public Object findOne(Class<?> c, String sql) throws Exception;

    public Object findAll(Class<?> c,String sql) throws  Exception;

    public Object  findAll(Class<?> c,String sql, Object[] params) throws DataAccessException;
}
